home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
msoftapp.zip
/
FILEWIN.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-01
|
2KB
|
69 lines
// filewin.h : Declares the class interfaces for the application.
#ifndef __FILEWIN_H__
#define __FILEWIN_H__
// Derived class to handle large line files
class CLineFile : public CStdioFile
{
LONG m_lBeginLine; // 0 for beginning of file, -1 for don't know
// offset of beginning of a line
DECLARE_DYNAMIC(CLineFile)
public:
CLineFile();
CLineFile(const char* pszFileName, UINT nOpenFlags);
virtual LONG NextLine(char FAR* lpsz, UINT nMax);
virtual LONG BackLines(char FAR* lpsz, UINT nMax, UINT nLines);
virtual LONG LineNear(char FAR* lpsz, UINT nMax, LONG lOffset);
virtual LONG SetBegin(LONG lnewBegin);
LONG GetBegin() { return m_lBeginLine; };
virtual ~CLineFile();
};
class CFileWin : public CMDIChildWnd
{
CString strFileTitle;
CLineFile* m_pMyFile;
short m_nVScrollPos;
short m_nHScrollPos;
CMenu* m_pMenuCurrent;
short m_ColorID;
COLORREF m_TextColor;
LONG m_lTopLine;
LONG m_lFileSize;
UINT m_nCxChar;
UINT m_nCyChar;
UINT m_nLinesPainted;
BOOL m_bWindowActive;
protected:
BOOL FileDlg(BOOL bOpen, int nMaxFile, LPSTR szFile,
int nMaxFileTitle, LPSTR szFileTitle);
public:
CFileWin();
~CFileWin();
BOOL Open();
afx_msg int OnCreate(LPCREATESTRUCT lpcs);
afx_msg void OnPaint();
afx_msg void OnAbout();
afx_msg void OnColor();
afx_msg void OnExit();
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnMDIActivate(BOOL bActivate, CWnd*, CWnd*);
afx_msg void OnDestroy();
DECLARE_MESSAGE_MAP()
};
const SCROLLMAX = 1000;
#endif // __FILEWIN_H__